package com.acme.chat.newclient;

import java.io.Serializable;
import java.util.List;

import com.acme.chat.message.MessageType;

public class ServerMessage implements Serializable {
    private MessageType type;
    private String message;
    private String changedName;

    private List<String> usersList;

    public ServerMessage(MessageType type, String message) {
        this.type = type;
        this.message = message;
    }

    public ServerMessage(MessageType type) {
        this(type, null);
    }

    public MessageType getType() {
        return type;
    }

    public String getMessage() {
        return message;
    }

    public List<String> getUsersList() {
        return usersList;
    }

    public void setUsersList(List<String> usersList) {
        this.usersList = usersList;
    }

    public void setConnectedName(String name) {
        this.changedName = name;
    }

    public String getConnectedName() {
        return changedName;
    }

    public void setDisconnectedName(String name) {
        this.changedName = name;
    }

    public String getDisconnectedName() {
        return changedName;
    }

}
